package com.dody.agile.payment.transaction;


import com.dody.agile.payment.database.PayrollDatabase;
import com.dody.agile.payment.database.PayrollDatabaseFactory;

/**
 * @author ShiXin
 * @date 2019/4/9 21:33
 * @description ExamStack
 */
public class DeleteEmployee implements Transaction {

    private Integer empId;

    private PayrollDatabase payrollDatabase = PayrollDatabaseFactory.getInstance();

    public DeleteEmployee(Integer empId) {
        this.empId = empId;
    }

    @Override
    public void execute() {
        payrollDatabase.deleteEmployee(empId);
    }
}
